#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
using namespace std;

int main() {

  double rho{1.138535483}, u{0.1999877946 * 345.8083995}, mu{1.834715289e-05},
      x{0.4};
  const int n = 200;
  double dx = x / n;
  ofstream os{"cf_internal.plt"};
  os << setprecision(16);
  os << "VARIABLES = \"x\", \"Cf\"\n";
  os << "ZONE T=\"Blasius\",  I=" << n << endl;
  for (int i = 1; i <= n; ++i) {
    double pos = dx * i;
    double Rex = rho * u * pos / mu;
    os << pos << ", " << 0.664 / sqrt(Rex) << "\n";
  }
  os.close();
  return 0;
}